package com.dhcc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dhcc.entity.IdGenerator;
import org.apache.ibatis.annotations.Mapper;

/**
 * ID生成器 Mapper 接口，负责数据库操作。
 *
 * @ProjectName Dhcc-Cloud
 * @PackageName com.dhcc.mapper
 * @Title IdGeneratorMapper
 * @Date 2024/10/17 下午7:25
 * @Author LiuGuoting
 */
@Mapper
public interface IdGeneratorMapper extends BaseMapper<IdGenerator> {
    /**
     * 根据 workerId 和 datacenterId 查询 ID 生成器信息
     * @param workerId
     * @param datacenterId
     * @return
     */
    IdGenerator selectByWorkerIdAndDatacenterId(Long workerId, Long datacenterId);
}